﻿using DLog.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DLog.IStorageDal
{
    public interface IDal
    {
        /// <summary>
        /// 通过日志编号查询日志模型信息
        /// </summary>
        /// <param name="LogId"></param>
        /// <returns></returns>
        LogModel SelectModel(int logId);
        /// <summary>
        /// 通过日志等级获得所以属于这个等级的日志数据集，返回个数
        /// </summary>
        /// <param name="logLevel"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<LogModel> SelectList(int logLevel);
        /// <summary>
        /// 通过日志等级获得所以属于这个等级的某一页的日志数据集，返回个数
        /// </summary>
        /// <param name="logLevel"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<LogModel> SelectList(int logLevel, int pageIndex, int pageSize);
        /// <summary>
        /// 通过创建的时间区间获得所以属于这个等级的某一页的日志数据集，返回个数
        /// </summary>
        /// <param name="CreateStartDate"></param>
        /// <param name="CreateEndDate"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<LogModel> SelectList(DateTime createStartDate, DateTime createEndDate, int pageIndex, int pageSize);
        /// <summary>
        /// 通过创建的日志等级和时间区间获得所以属于这个等级的某一页的日志数据集，返回个数
        /// </summary>
        /// <param name="logLevel"></param>
        /// <param name="CreateStartDate"></param>
        /// <param name="CreateEndDate"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<LogModel> SelectList(int logLevel, DateTime createStartDate, DateTime createEndDate, int pageIndex, int pageSize);
        /// <summary>
        /// 更新日志信息
        /// </summary>
        /// <param name="lm"></param>
        /// <returns></returns>
        int Update(LogModel lm);
        /// <summary>
        /// 插入日志信息
        /// </summary>
        /// <param name="lm"></param>
        /// <returns></returns>
        int Insert(LogModel lm);
        /// <summary>
        /// 通过日志编号删除日志
        /// </summary>
        /// <param name="LogId"></param>
        /// <returns></returns>
        int Delete(int logId);
        /// <summary>
        /// 删除日志信息
        /// </summary>
        /// <param name="lm"></param>
        /// <returns></returns>
        int Delete(LogModel lm);
    }
}
